<script setup>
import { onMounted, ref } from 'vue'

const playvideo = ref(null)
const props = defineProps({
  videosrc: {
    type: String,
    default: ''
  }
})
// const emits = defineEmits(['closevideozx'])
// function closeVideo() {
//   emits('closevideozx')
// }
onMounted(() => {
  
})
</script>

<template>
  <div class="videoview">
    <video
      id="playvideo"
      ref="playvideo"
      :src="props.videosrc"
      :loop="true"
      autoplay
      preload="auto"
    >
      <source type="video/mp4" />
    </video>
    <!-- <div class="anclosevideo" @click="closeVideo"></div> -->
  </div>
</template>

<style lang="scss" scoped>
.videoview {
  width: 100vw;
  height: 56.25vw;
  position: relative;
  z-index: 1;
  #playvideo {
    width: 100vw;
    height: 56.25vw;
    background-color: #f9f8f3;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 7;
    border: 0px solid red;
  }
  .anclosevideo {
    width: 4.6vw;
    height: 2vw;
    background: url(/anback.png) no-repeat;
    background-size: 4.6vw 2vw;
    position: absolute;
    left: 86vw;
    top: 1vw;
    z-index: 9;
  }
}
</style>
